/*
 * ksAtomBlockWriter.h
 *
 *  Created on: Aug 3, 2011
 *      Author: wang
 */

#ifndef KSATOMBLOCKWriter_H_
#define KSATOMBLOCKWriter_H_
#include "../ksAtomBlock.h"

class ksAtomBlockWriter: public ksAtomBlock, public ksBlockWriter
{
public:
    ksAtomBlockWriter();
    virtual ~ksAtomBlockWriter();
public:
    unsigned int blockLength();
    void prepare( int blockPositionInFile );
    void save(std::ofstream& out);
public:
    virtual void setData(unsigned char* data, unsigned int length);
protected:
    unsigned char* _data;
public:
    virtual ksBlockWriter* writer()
    {
        return this;
    }
};

#endif /* KSATOMBLOCK_H_ */
